BlueCielo Meridian Enterprise 2012 Developer's Guide | BlueCielo ECM Solutions

OnExecute method

The code written in this handler will be executed when the user selects the command from the host application. It will run in a transaction that is provided and managed by Meridian Enterprise.

Parameters
Name Description

CurrentObject

The object (usually a document) on which the command is invoked.

Host

Reference to the host application.

Remarks

When you double-click a command in the interface extension designer, a default handler will be created automatically.

Private Sub Command4_OnExecute(ByVal CurrentObject As Object, ByVal Host As Object)
    On Error GoTo error_handler
    
    '   TODO : Insert your code here
    
    Exit Sub
error_handler:
    MsgBox Err.Description
End Sub

To use the properties and methods of the interface extension designer, declare a local variable as shown below.

    Dim dsg As AMUIExtension
    Set dsg = Me
Example
Private Sub CreateWorkingCopy_OnExecute(ByVal CurrentObject As Object, ByVal Host As Object)
    On Error GoTo Error_handler
    
    Dim exhost As IAMExtensionHost2
    Set exhost = Host
        InvokeEDMUICommand Me, CurrentObject, AMIV_CREATEDRAFT, exhost.hwnd
    
    Exit Sub
Error_handler:
    MsgBox Err.Description
End Sub

Copyright © 2000-2012 BlueCielo ECM Solutions

www.bluecieloecm.com